#include<iostream>
#include<vector>
using namespace std;

void bubbleSort(vector<int>& nums);
void printNums(vector<int> nums);
int main(){
    vector<int> nums={1,2,4,1,2,6,5};
    bubbleSort(nums);
    printNums(nums);
    return 0;
}
void bubbleSort(vector<int>& nums){
    for(int i=0;i<nums.size()-1;i++){
        for(int j=0;j<nums.size()-i-1;j++){
            if(nums[j]>nums[j+1])
                swap(nums[j],nums[j+1]);
        }
    }
}
void printNums(vector<int> nums){
    for(vector<int>::iterator it=nums.begin();it!=nums.end();++it){
        cout<<*it<<" ";
    }
}